package fhp.hlhj.giantfold.module

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.interfaces.BaseModuleInterface
import fhp.hlhj.giantfold.javaBean.MerchantBean
import fhp.hlhj.giantfold.network.UrlApis

/**
 * Created by Administrator on 2018\2\9 0009.
 */
class MerChantModule {
    interface OnMerChantResp:BaseModuleInterface<MerchantBean>

    fun getMerchants(params: HttpParams,listener:OnMerChantResp){
        UrlApis.getMerchantDetail(params)
                .doOnSubscribe {
                    listener.showLoading()
                }
                .subscribe {
                    data->
                    listener.onResp(data)
                }
    }
}